import request from '@/utils/request'

/**
 * 新增分类
 * @param pram
 */
export function addAdoptFodder(pram) {
  const data = {
    name: pram.name
  }
  return request({
    url: '/admin/adoptFodder/save',
    method: 'POST',
    params: data
  })
}

/**
 * 分类详情
 * @param pram
 */
export function infoAdoptFodder(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/admin/adoptFodder/list',
    method: 'GET',
    params: data
  })
}


/**
 * 饲料搭配
 * @param pram
 */
export function infoAdoptFodderId(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/admin/adoptFodder/infoAdoptFodderId',
    method: 'GET',
    params: data
  })
}

/**
 * 删除分类
 * @param pram
 */
export function deleteAdoptFodder(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/admin/adoptFodder/delete',
    method: 'GET',
    params: data
  })
}

/**
 * 分类列表
 * @param pram
 */
export function listAdoptFodder(pram) {
  const data = {
    limit: pram.limit,
    name: pram.name,
    page: pram.page

  }
  return request({
    url: '/admin/adoptFodder/list',
    method: 'GET',
    params: data
  })
}

/**
 * 更新分类
 * @param pram
 */
export function updateAdoptFodder(pram) {
  const data = {
    name: pram.name
  }
  return request({
    url: '/admin/adoptFodder/update',
    method: 'POST',
    params: data
  })
}
